#!/bin/bash

singers=( $( cat singers.txt ) )
songs=( $( cat song.txt ) )
echo ${singers[@]}
echo ${songs[@]}

while true;
do
	random_singers=$(( $RANDOM % ${#singers[@]} ))
	random_songs=$(( $RANDOM % ${#singers[@]} ))
	singer=${singers[$random_singers]}
	song=${songs[$random_songs]}
	echo "请歌手$singer 唱歌$song	"
	unset singers[$random_singers]
	singers=(${singers[@]})
	if (( ${#singers[@]}==0 ));then
		break
	fi

done

